﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLBS.Entity;

namespace NLBS.Data.Interface
{
   public interface IGuestBookService
    {
        #region GuestBook

        /// <summary>
        /// 获取留言列表
        /// </summary>
        /// <returns></returns>
         IList<GuestBook> GetGuestBook();

        /// <summary>
        /// 分页根据关键字搜索评论
        /// </summary>
        /// <param name="startIndex">起始页</param>
        /// <param name="pageSize">每页显示留言数</param>
        /// <param name="prefix">关键字</param>
        /// <returns></returns>
         IPagedCollection<GuestBook> GetGuestBookBySearch(int startIndex, int pageSize, string prefix);

        /// <summary>
        /// 获取最新留言
        /// </summary>
        /// <returns></returns>
         IList<GuestBook> GetTopGuestBook();

        /// <summary>
        /// 获取单条留言
        /// </summary>
        /// <param name="gbookID"></param>
        /// <returns></returns>
         GuestBook GetGuestBookByID(int gbookID);

        /// <summary>
        /// 新增一条留言
        /// </summary>
        /// <param name="gbook"></param>
        /// <returns></returns>
         int InsertGuestBook(GuestBook gbook);

        /// <summary>
        /// 更新一条留言
        /// </summary>
        /// <param name="gbook"></param>
         void UpdateGuestBook(GuestBook gbook);

        /// <summary>
        /// 删除一条留言
        /// </summary>
        /// <param name="gbookID"></param>
         void DeleteGuestBook(int gbookID);

        /// <summary>
        /// 获取留言总数
        /// </summary>
        /// <returns></returns>
         int GetAllGuestBookCount();

        /// <summary>
        /// 分页获取留言
        /// </summary>
        /// <param name="startIndex">起始页</param>
        /// <param name="pageSize">每页显示留言数</param>
        /// <returns></returns>
         IPagedCollection<GuestBook> GetAllGuestBookByPage(int startIndex, int pageSize);

        #endregion
    }
}
